﻿using System.ComponentModel;
using Utility.Enum;
using Utility;

namespace Model.BusinessModel.OutPut.sys
{
    /// <summary>
    /// 数据规则输出模型
    /// </summary>
    [EnitityMapping(MenuId = "380CA40B-8B62-4EBE-86D7-91AE48292F60")]
    public class SysDataRuleOutPut
    {
        /// <summary>
        /// 数据规则ID
        /// </summary>
        [Description("数据规则ID")]
        public required string RuleId { get; set; }

        /// <summary>
        /// 规则名称
        /// </summary>
        [Description("规则名称")]
        public required string RuleName { get; set; }

        /// <summary>
        /// 公司key
        /// </summary>
        [Description("公司key")]
        public string? CorporationKey { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        [Description("公司名称")]
        public string? CorporationName { get; set; }

        /// <summary>
        /// 系统Key
        /// </summary>
        [Description("系统Key")]
        public string? SystemKey { get; set; }

        /// <summary>
        /// 系统名称
        /// </summary>
        [Description("系统名称")]
        public string? SystemName { get; set; }

        /// <summary>
        /// 菜单id
        /// </summary>
        [Description("菜单id")]
        public string? MenuId { get; set; }

        /// <summary>
        /// 所属菜单
        /// </summary>
        [Description("所属菜单")]
        public string? MenuName { get; set; }

        /// <summary>
        /// 规则类型：1：数据行规则 2：数据按钮规则
        /// </summary>
        [Description("规则类型")]
        public int RuleType { get; set; }

        /// <summary>
        /// 规则类型：1：数据行规则 2：数据按钮规则
        /// </summary>
        [Description("规则类型")]
        public string RuleTypeStr => EnumHelper.GetDescription((RuleTypeEnum)RuleType);

        /// <summary>
        /// 规则json
        /// </summary>
        [Description("规则json")]
        public string? RuleJson { get; set; }

        /// <summary>
        /// 英文匹配规则
        /// </summary>
        [Description("解析后的规则")]
        public string? AnalysisRule { get; set; }

        /// <summary>
        /// 中文匹配规则
        /// </summary>
        [Description("解析后的规则")]
        public string? AnalysisRule_CN { get; set; }
        
        /// <summary>
        /// 是否使用
        /// </summary>
        [Description("是否使用")]
        public bool IsOpen { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        public string? Remark { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Description("排序")]
        public int Sort { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Description("创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人员
        /// </summary>
        [Description("创建人员")]
        public string? CreateUser { get; set; }

        /// <summary>
        /// 创建人姓名
        /// </summary>
        [Description("创建人姓名")]
        public string? UserName { get; set; }
    }
}
